Method: Hash#<<

Defined in:
lib/core/facets/hash/op_push.rb

#<<(other) ⇒ Object

Can be used like update, or passed as two-element [key,value] array.

CREDIT: Trans



8
9
10
11
12
13
14
15
# File 'lib/core/facets/hash/op_push.rb', line 8

def <<(other)
  if other.respond_to?(:to_ary)
    store(*other)
  else
    update(other)
  end
  self
end